﻿<div class="modal-header">
    <button type="button" class="close" ng-disabled="loadingState" ng-click="close();"><span aria-hidden="true">&times;</span></button>
    <h3>
        <i class="fa-edit"></i>
        编辑地址
    </h3>
</div>

<div class="modal-body">
    <form id="changeUrlForm" role="form" class="form-horizontal">
        <div class="form-group">
            <label class="col-sm-4 control-label">网考服务地址：</label>

            <div class="col-sm-6">
                <input type="text" class="form-control" id="txtAppUrl" name="txtAppUrl" ng-model="appUrl" placeholder="请输入网考服务地址" />
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4 control-label">网考FTP地址：</label>

            <div class="col-sm-6">
                <input type="text" class="form-control" id="txtAppFtpUrl" name="txtAppFtpUrl" ng-model="ftpUrl" placeholder="请输入网考FTP地址" />
            </div>
        </div>
    </form>
</div>

<div class="modal-footer">
    <button type="submit" class="btn btn-turquoise" ng-click="save();" ng-disabled="loadingState">
        <i class="fa fa-save" ng-hide="loadingState"></i>
        <i class="fa fa-spinner fa-spin" ng-show="loadingState"></i>
        <span>保存</span>
    </button>
    <button type="button" class="btn btn-gray" ng-click="close();" ng-disabled="loadingState">
        <i class="fa fa-close"></i>
        <span>关闭</span>
    </button>
</div>

<script>
    $(function () {
        $('form#changeUrlForm').validate({
            rules: {
                txtAppUrl: { required: true, isURL: false },
                txtAppFtpUrl: { required: true }
            },
            messages: {
                txtAppUrl: { required: '请输入网考服务地址！' },
                txtAppFtpUrl: { required: '请输入网考FTP地址！' }
            }
        });
    });
</script>
